package com.eryos.android.cigarettecounter.beans;

/**
 * Project :  CigaretteCounter
 * Author :   Olivier Combe 
 * URL :      http://eryos.fr/CigaretteCounter/
 *
 * Copyright (C) 2011 - Olivier Combe 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 *
 */

public class SmokeTime {

	private int hour = -1;
	private int minute = -1;
	private int seconds = -1;
	private int totalMinutes = -1;

	private double totalTime = -1;
	
	public SmokeTime(){ 
 
		
	}

	public void parse(){
		
		hour 		 = (int) (totalTime*24);
		minute 		 = (int) (((totalTime*24)-hour)*60);
		totalMinutes = hour * 60 + minute;
	}
	
	public void genTotalMinutes(){
		totalMinutes = hour * 60 + minute;
	}
	public int getHour() {
		return hour;
	}

	public void setHour(int hour) {
		this.hour = hour;
	}

	public int getMinute() {
		return minute;
	}

	public void setMinute(int minute) {
		this.minute = minute;
	}

	public int getSeconds() {
		return seconds;
	}

	public void setSeconds(int seconds) {
		this.seconds = seconds;
	}

	public int getTotalMinutes() {
		return totalMinutes;
	}

	public void setTotalMinutes(int totalMinutes) {
		this.totalMinutes = totalMinutes;
	}

	public void setTotalTime(double totalTime) {
		this.totalTime = totalTime;
	}
	
	
	public String toString(){
		return "H: "+hour+" M: "+minute+" S: "+seconds+" / Total : "+totalMinutes;
	}
	
	
}
